package org.ssp.dao;

import java.util.ArrayList;
import java.util.Date;

import org.ssp.pojo.Task;
import org.ssp.pojo.TimerMessage;
import org.ssp.pojo.Travel;
import org.ssp.pojo.User;


public interface UserDao {
	public abstract ArrayList<User> findNoassigned(int offset,int rows);
	public abstract int findAllNoAssign();
	public abstract void updateAssistid(User user);
	public abstract ArrayList<User> findByAssistid(String assistid,int offset,int rows);
	public abstract int findByAssistid(String assistid);
	public abstract ArrayList<User> findAll(int page,int rows);
	public abstract int findAll();
	public abstract ArrayList<User> findOrdinary(int page,int rows);
	public abstract int findOrdinary();
	public abstract ArrayList<User> findVip(int page,int rows);
	public abstract int findVip();
	public abstract ArrayList<User> findByTravelId(int travelid,int offset,int rows);//参加某个活动的人员名单
	public abstract int findByTravelId(int travelid);
	public abstract User findById(String uid);//根据uid查找用户
	public abstract ArrayList<String[]> findFileByUid(String uid);//会员对应的附件
	public abstract void addFile(String uid,String url,String title);//添加会员附件
	public abstract void deleteFile(String uid,String url);//删除会员附件
    public abstract ArrayList<Task> findTaskByUid(String uid);
	public abstract void addUserLink(String uid,String url);//给用户添加一个链接地址
	public abstract void updateUserLink(String uid,String url);//修改链接地址
	public abstract String findLinkByUid(String uid);//判读会员对应的url是否存在
	public abstract ArrayList<Travel> findTravelsByUid(String uid);//会员参与的活动
	public abstract Travel findTravelById(int id);//查找指定id的travel
	public abstract void updateUserInfo(User user);//修改会员资料
	public abstract void addUserByAdminer(User user);//管理员手动添加会员
	public abstract TimerMessage addComment(TimerMessage tmsg );//添加定时消息
	public abstract ArrayList<TimerMessage> findCommentByassist(String assistid,String uid);//列出assisti添加的所有comment
	public abstract void deleteComment(int id);//删除comment
	public abstract void editComment(int id,String content);//修改comment
	public abstract void setDateTime(int id,Date datetime);//设置提醒时间
	public abstract ArrayList<TimerMessage> findTimerMessage(String assistid);
	public abstract void closeTimerAfterShow(int id);//保证提醒消息只弹出一次
	public abstract TimerMessage findTimerMessage(int id);//查找某个id的提醒消息
	
	
	
	
	public abstract void addUser(User user);
	public abstract void addUser2(User user);
	public abstract void addUser3(User user);

	public abstract void update(String id);
	public abstract void update(User user);
	public abstract void update2(User user);
	public abstract void update3(User user);
	public abstract void update4(User user);
	public abstract User findByPhone(String phone);
	public abstract User findByphonepwd(String phone,String pwd);
	public abstract User findByOpenId(String openid);
	public abstract ArrayList<User> findAssigned();
	public abstract User findByUid(String uid);
	
	public abstract void setUserType(String openid,int type);//修改会员类型//免费会员：0   英盟MT： 1        英盟ME：2       英盟PLUS：3
	
	

	

}
